<html xmlns:fo="http://www.w3.org/1999/XSL/Format"><head><title>mx.fmxis.FMXISPotentiometer Class</title><link rel="stylesheet" type="text/css" href="../../../docs.css"></link></head><body><h1>FMXISPotentiometer Class</h1><p><b>Class </b>mx.fmxis.FMXISPotentiometer</p><p><b>Inheritance </b>
			
			&gt;
			
		<a href="../FMXISBase/Class.htm">FMXISBase</a>
			
			&gt;
			
		<a href="../FMXISJog/Class.htm">FMXISJog</a>
			
			&gt;
			
		<a href="Class.htm">FMXISPotentiometer</a></p><div class="description"><p>This class implements a simple potentiometer, which is virtually identical in functionality to
the jog knob we implemented (FMXISJog).  Developers can set the increment, number of values
in one cycle, integer vs. discrete, minimum and maximum values, and whether the jog is adjusted by clicking and dragging,
or merely moving in a circular motion (<code>dragOrOver</code>).</p>
<br /><br />
Developers can change the appearance by modifying:
<li><code>defPotBkgnd</code> - background</li>
<li><code>defPotIndicator</code> - indicator clip</li>
<li><code>defPotIncr</code> - Increment button (increments by 1 unit)</li>
<li><code>defPotDecr</code> - Decrement button (decrements by 1 unit)</li>
<br /><br />
<p>The class also has one property that developers can set in the component property panel,
<code>indLinkID</code>, that replaces the default indicator graphic with a movie clip from
the Library specified by the linkage ID supplied.  The movie clip must have its center at
the center of rotation, so if the developer simply wants to change the indicator (notch), then the
indicator should be placed in the topmost (pointing up) position at the edge of the background.  When
a linkage ID is given, the component scales the background graphic to the maximum dimension of the indicator
movie clip, so the hit area (determined by the background) is correct.  Usually, the developer will
want to turn off the background graphic (using the property in the component property panel).</p>
<p>The class has one event, by default called "onValChg" (but this can
be changed in the property inspector, or by changing the <code>vChg</code> property), and
the value is the new value of the potentiometer.  If the user does not change values, this component
still reports the current knob position.  The <code>drawTicks</code> property, if true, tells the component
to draw <code>numTicks</code> ticks.</p>
<br /><br />
<p>The potentiometer value can be set using the <code>val</code> property or through the <code>setVal()</code> method.</p>
<br /><br />
<p>This class inherits from <code>FMXISJog</code> to get most of its functionality.</p></div><table border="1" cellpadding="2" cellspacing="0"><tr><th colspan="2" class="ObjectsSummaryHeading">Property Summary</th></tr><tr><td valign="top" width="1%"><span class="Attributes">&nbsp;</span><span class="type">String</span>&nbsp;</td><td valign="top"><div class="functionNameAndParams">&nbsp;<a href="#className">className</a></div><div class="functionSummaryLine"></div></td></tr><tr><td valign="top" width="1%"><span class="Attributes">&nbsp;</span><span class="type"></span>&nbsp;</td><td valign="top"><div class="functionNameAndParams">&nbsp;<a href="#maxVal">maxVal</a></div><div class="functionSummaryLine"></div></td></tr><tr><td valign="top" width="1%"><span class="Attributes">&nbsp;</span><span class="type"></span>&nbsp;</td><td valign="top"><div class="functionNameAndParams">&nbsp;<a href="#minVal">minVal</a></div><div class="functionSummaryLine"></div></td></tr><tr><td valign="top" width="1%"><span class="Attributes">&nbsp;static&nbsp;</span><span class="type">String</span>&nbsp;</td><td valign="top"><div class="functionNameAndParams">&nbsp;<a href="#symbolName">symbolName</a></div><div class="functionSummaryLine"></div></td></tr><tr><td valign="top" width="1%"><span class="Attributes">&nbsp;static&nbsp;</span><span class="type">Object</span>&nbsp;</td><td valign="top"><div class="functionNameAndParams">&nbsp;<a href="#symbolOwner">symbolOwner</a></div><div class="functionSummaryLine"></div></td></tr></table><table border="1" cellpadding="2" cellspacing="0" class="inheritedObjects"><tr><th class="InheritedHeading">Properties inherited from mx.fmxis.FMXISJog</th></tr><tr><td><div class="inheritedMemberList"><a href="../FMXISJog/Class.htm#clickSnd">clickSnd</a>, <a href="../FMXISJog/Class.htm#discreteSteps">discreteSteps</a>, <a href="../FMXISJog/Class.htm#JogEvent">JogEvent</a>, <a href="../FMXISJog/Class.htm#numTicks">numTicks</a>, <a href="../FMXISJog/Class.htm#showButs">showButs</a>, <a href="../FMXISJog/Class.htm#showTicks">showTicks</a>, <a href="../FMXISJog/Class.htm#snap2Int">snap2Int</a>, <a href="../FMXISJog/Class.htm#units">units</a>, <a href="../FMXISJog/Class.htm#val">val</a>, <a href="../FMXISJog/Class.htm#vChg">vChg</a></div></td></tr></table><table border="1" cellpadding="2" cellspacing="0" class="inheritedObjects"><tr><th class="InheritedHeading">Properties inherited from mx.fmxis.FMXISBase</th></tr><tr><td><div class="inheritedMemberList"><a href="../FMXISBase/Class.htm#addEventListener">addEventListener</a>, <a href="../FMXISBase/Class.htm#clipParameters">clipParameters</a>, <a href="../FMXISBase/Class.htm#removeEventListener">removeEventListener</a></div></td></tr></table><table border="1" cellpadding="2" cellspacing="0"><tr><th colspan="2" class="ObjectsSummaryHeading">Method Summary</th></tr><tr><td valign="top" width="1%"><span class="Attributes">&nbsp;</span><span class="type"></span>&nbsp;</td><td valign="top"><div class="functionNameAndParams">&nbsp;<a href="#execEvent">execEvent</a>(evName, evVal, q)</div><div class="functionSummaryLine">Given an event string and value that matches what this component would generate, perform the action.</div></td></tr><tr><td valign="top" width="1%"><span class="Attributes">&nbsp;</span><span class="type"></span>&nbsp;</td><td valign="top"><div class="functionNameAndParams">&nbsp;<a href="#setVal">setVal</a>(v, q)</div><div class="functionSummaryLine">Sets the potentiometer value.</div></td></tr></table><table border="1" cellpadding="2" cellspacing="0" class="inheritedObjects"><tr><th class="InheritedHeading">Methods inherited from mx.fmxis.FMXISJog</th></tr><tr><td><div class="inheritedMemberList"><a href="../FMXISJog/Class.htm#decrJog">decrJog</a>, <a href="../FMXISJog/Class.htm#incrJog">incrJog</a>, <a href="../FMXISJog/Class.htm#incrVal">incrVal</a></div></td></tr></table><table border="1" cellpadding="2" cellspacing="0" class="inheritedObjects"><tr><th class="InheritedHeading">Methods inherited from mx.fmxis.FMXISBase</th></tr><tr><td><div class="inheritedMemberList"><a href="../FMXISBase/Class.htm#addListener">addListener</a>, <a href="../FMXISBase/Class.htm#init">init</a>, <a href="../FMXISBase/Class.htm#removeListener">removeListener</a></div></td></tr></table><table border="1" cellpadding="2" cellspacing="0" class="inheritedObjects"><tr><th class="InheritedHeading">Events inherited from mx.fmxis.FMXISJog</th></tr><tr><td><div class="inheritedMemberList"><a href="../FMXISJog/Class.htm#onValChg">onValChg</a></div></td></tr></table><table border="1" cellpadding="2" cellspacing="0"><tr><th class="ObjectsDetailHeading">Property Detail</th></tr></table><div class="DetailRow"><a name="className"></a><div class="DetailObjectTitle">className</div><div class="DetailObjectDeclaration"> var className:String;</div><div class="DetailDescription"></div></div><div class="DetailRow"><a name="maxVal"></a><div class="DetailObjectTitle">maxVal</div><div class="DetailObjectDeclaration">public function get/set maxVal()</div><div class="DetailDescription"></div></div><div class="DetailRow"><a name="minVal"></a><div class="DetailObjectTitle">minVal</div><div class="DetailObjectDeclaration">public function get/set minVal()</div><div class="DetailDescription"></div></div><div class="DetailRow"><a name="symbolName"></a><div class="DetailObjectTitle">symbolName</div><div class="DetailObjectDeclaration"> static var symbolName:String;</div><div class="DetailDescription"></div></div><div class="DetailRow"><a name="symbolOwner"></a><div class="DetailObjectTitle">symbolOwner</div><div class="DetailObjectDeclaration"> static var symbolOwner:Object;</div><div class="DetailDescription"></div></div><table border="1" cellpadding="2" cellspacing="0"><tr><th class="ObjectsDetailHeading">Method Detail</th></tr></table><div class="DetailRow"><a name="execEvent"></a><div class="DetailObjectTitle">execEvent</div><div class="DetailObjectDeclaration">public function  execEvent(evName, evVal, q)</div><div class="DetailDescription">Given an event string and value that matches what this component would generate, perform the action.
For the potentiometer component, the event is onValChg and the value is the new value.</div><div class="DetailParamsTitle">Parameters:</div><div class="DetailParamsLine"><code>evName</code> - Event name (string) must match the event this component generates</div><div class="DetailParamsLine"><code>evVal</code> - (optional) value accompanying the event (if the event has an accompanying value)</div><div class="DetailParamsLine"><code>quiet</code> - (optional) set this to true if component should perform the action but not generate an event (this should be false or undefined, unless you know what you are doing)</div><div class="DetailsExampleTitle">Example</div><div class="DetailsExampleLine">myPot.execEvent("onValChg", 1); // set the potentiometer to 1</div></div><div class="DetailRow"><a name="setVal"></a><div class="DetailObjectTitle">setVal</div><div class="DetailObjectDeclaration">public function  setVal(v, q)</div><div class="DetailDescription">Sets the potentiometer value.</div><div class="DetailParamsTitle">Parameters:</div><div class="DetailParamsLine"><code>v</code> - Numeric value (between 0 and <code>units</code>)</div><div class="DetailParamsLine"><code>q</code> - (optional) Boolean flag indicating whether to set the value quietly (no event notification) or with notification (default).  You can also use the <code>val</code> property to set the value, but it does not generate an event.</div><div class="DetailsExampleTitle">Example</div><div class="DetailsExampleLine">myPot.setVal(5); // sets the knob to 5</div></div><br /><br /><hr /><span style='font-size: x-small; font-family: Verdana, Arial'>Documentation generated by <a href='http://wwww.blinex.com/products/bldoc' target='_blank' alt='BLDoc Link'>BLDoc Community Edition</a> from <a href='http://www.blinex.com' target='_blank' alt='B-Line Express Website'>B-Line Express</a>.</body></html>